package com.xyrl.project.common.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xyrl.project.common.system.entity.Menu;

import java.util.List;
import java.util.Map;

public interface MenuService extends IService<Menu> {
    /**
     * 取得用户权限
     * @author zhongp
     * @date 2020-01-02 10:22:19
     * @param username
    */
    List<Menu> findUserPermissions(String username);
    /**
     * 取得并缓存用户权限
     * @author zhongp
     * @date 2020-01-02 10:22:27
     * @param username
    */
    List<Menu> findAndCacheUserPermissions(String username);

    List<Menu> findUserMenus(String username);

    Map<String, Object> findMenus(Menu menu);

    List<Menu> findMenuList(Menu menu);

    void createMenu(Menu menu);

    void updateMenu(Menu menu) throws Exception;

    /**
     * 递归删除菜单/按钮
     *
     * @param menuIds menuIds
     */
    void deleteMeuns(String[] menuIds) throws Exception;

}
